// LemCoop
// Copyright (C) 2013  Oliver Naumann <bldrax@gmail.com>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef LEMC_GLOBAL_H
#define LEMC_GLOBAL_H

#include "WindowsIncludes.h"
#include <allegro5/allegro.h>
#include <string>
#include <cstdint>

// Standard level variables
const float STANDARD_TIME_TO_OPEN    = 1000.0f;
const float STANDARD_TIME_TO_RELEASE = 2000.0f;

const int MAX_PLAYERS = 8;
const std::int32_t MAX_LEVELSIZE_IN_BYTE = 1000000; // Do not allow level files with data greater than 1 MB.

// Lem animations.
const int LEM_ANIMATION_NUMBER = 1;
const std::string STANDARD_LEM_GRAPHIC = "testlem_anim";

const std::string LEM_GRAPHICS[1] =
{
	std::string("testlem_anim")
};

const int STANDARD_LEM_WIDTH = 30;
const int STANDARD_LEM_HEIGHT = 50;

const int STANDARD_WALK_ANIMATION_X = 0;
const int STANDARD_WALK_ANIMATION_Y = 0;
const float STANDARD_WALK_ANIMATION_TIME = 100.0f;
const int STANDARD_WALK_ANIMATION_LENGTH = 4;

const int STANDARD_FALL_ANIMATION_X = 0;
const int STANDARD_FALL_ANIMATION_Y = 50;
const float STANDARD_FALL_ANIMATION_TIME = 100.0f;
const int STANDARD_FALL_ANIMATION_LENGTH = 4;

// Mask colors.
const int LEVEL_MASK_COLORS[4][3] = 
{
	{ 0,   0,   0   },
	{ 255, 255, 255 },
	{ 0,   0,   255 },
	{ 255, 255, 0   }
};

// Standard filepaths.
const std::string STANDARD_ENTRY_FILE     = "media/entries/entries.xml";
const std::string STANDARD_LEVELINFO_FILE = "levels/levelinfo.xml";
const std::string STANDARD_FONT           = "media/fonts/candara.ttf";
const int STANDARD_FONT_SIZE              = 12;

// Standard button graphics.
const std::string STANDARD_BUTTON_GRAPHIC_UP       = "standard_button_graphic_up";
const std::string STANDARD_BUTTON_GRAPHIC_DOWN     = "standard_button_graphic_down";
const unsigned char STANDARD_BUTTON_LABEL_COLOR[3] = {255, 255, 255};

// Standard helpsymbol graphics.
const std::string STANDARD_HELPSYMBOL_GRAPHIC           = "standard_helpsymbol_graphic";
const unsigned char STANDARD_HELPSYMBOL_LABEL_COLOR[3]  = {255, 128, 128};

// Standard checkbox graphics.
const std::string STANDARD_CHECKBOX_GRAPHIC_CHECKED = "standard_checkbox_checked_graphic";
const std::string STANDARD_CHECKBOX_GRAPHIC_UNCHECKED = "standard_checkbox_unchecked_graphic";
const unsigned char STANDARD_CHECKBOX_LABEL_COLOR[3] = {255, 255, 255};

// Standard textfield graphics.
const std::string STANDARD_TEXTFIELD_GRAPHIC_ACTIVE    = "standard_textfield_graphic_active";
const std::string STANDARD_TEXTFIELD_GRAPHIC_INACTIVE  = "standard_textfield_graphic_inactive";
const unsigned char STANDARD_TEXTFIELD_TEXT_COLOR[3]   = {255, 255, 255};
const int STANDARD_TEXTFIELD_PADDING                   = 3;
const int STANDARD_TEXTFIELD_MAXCHARS                  = 32;

// Standard scrollbar graphics.
const std::string STANDARD_SCROLLBAR_BOTTOM_BUTTON_GRAPHIC_UP   = "standard_scrollbar_bottom_button_graphic_up";
const std::string STANDARD_SCROLLBAR_BOTTOM_BUTTON_GRAPHIC_DOWN = "standard_scrollbar_bottom_button_graphic_down";
const std::string STANDARD_SCROLLBAR_TOP_BUTTON_GRAPHIC_UP      = "standard_scrollbar_top_button_graphic_up";
const std::string STANDARD_SCROLLBAR_TOP_BUTTON_GRAPHIC_DOWN    = "standard_scrollbar_top_button_graphic_down";
const std::string STANDARD_SCROLLBAR_SLIDER_GRAPHIC_UP          = "standard_scrollbar_slider_graphic_up";
const std::string STANDARD_SCROLLBAR_SLIDER_GRAPHIC_DOWN        = "standard_scrollbar_slider_graphic_down";
const std::string STANDARD_SCROLLBAR_SLIDER_BACKGROUND_GRAPHIC  = "standard_scrollbar_slider_background_graphic";
const int STANDARD_SCROLLBAR_BUTTON_HEIGHT                      = 20;
const int STANDARD_SCROLLBAR_SLIDER_PADDING                     = 2;
const int STANDARD_SCROLLBAR_SLIDER_HEIGHT                      = 40;

// Standard textbox graphics.
const int STANDARD_TEXTBOX_PADDING                    = 3;
const std::string STANDARD_TEXTBOX_BACKGROUND_GRAPHIC = "standard_textbox_background_graphic";
const int STANDARD_TEXTBOX_SCROLLBAR_WIDTH            = 20;
const int STANDARD_TEXTBOX_INDENTION                  = 5;
const unsigned char STANDARD_TEXTBOX_TEXT_COLOR[3]    = {255, 255, 255};

// Standard value list graphics.
const std::string STANDARD_VALUELIST_BACKGROUND_GRAPHIC     = "standard_valuelist_background_graphic";
const int STANDARD_VALUELIST_ENTRY_HEIGHT                   = 20;
const int STANDARD_VALUELIST_PADDING                        = 3;
const int STANDARD_VALUELIST_SCROLLBAR_WIDTH                = 20;
const std::string STANDARD_VALUELIST_ENTRY_GRAPHIC_ACTIVE   = "standard_valuelist_entry_graphic_active";
const std::string STANDARD_VALUELIST_ENTRY_GRAPHIC_INACTIVE = "standard_valuelist_entry_graphic_inactive";
const unsigned char STANDARD_VALUELIST_ENTRY_LABEL_COLOR[3] = {255, 255, 255};

#endif